package cn.edu.scau.cmi.linyiqu.simpleFactory;

import cn.edu.scau.cmi.linyiqu.simpleFactory.domain.Beef;
import cn.edu.scau.cmi.linyiqu.simpleFactory.domain.Chicken;
import cn.edu.scau.cmi.linyiqu.simpleFactory.domain.Meat;
import cn.edu.scau.cmi.linyiqu.simpleFactory.domain.Pork;

public class MeatFactory {
	
	public static Meat productMeat(String name) {
		Meat meat = null;
		switch (name) {
		case "beef":
			meat = new Beef();
			break;
		case "pork":
			meat = new Pork();
			break;
		case "chicken":
			meat = new Chicken();
		}
		return meat;
	}
}
